import { getBaseUrl } from '@/services/urlconst';
import { requestFunHtml } from '@/utils';
import { useRequest } from 'umi';

const baseUrl = getBaseUrl();
/**
 * 导出物资清单接口
 * */
export const exportExpertService = () => {
  const request = useRequest(
    (payload: any) => {
      let reqUrl = `${baseUrl}/assetMaterial/queryExport`;
      return requestFunHtml('POST', reqUrl, { ...payload });
    },
    {
      manual: true,
    },
  );
  return {
    exportExpertRun: request.run,
    exportExpertLoading: request.loading,
  };
};
